<?php namespace App\Infra;

use App\Utils\ModelOperatorTrait;
use App\Models\StoreGoods;
class StoreGoodsManager{
	use ModelOperatorTrait;

	public function getStoreGoods($conditions = null,$first = false,$union = []){
		return $this->findModel(StoreGoods::class,StoreGoods::query()->with($union),$conditions,$first);
	}

	public function updateStoreGoods($conditions = null,$data = null){
		$this->update(StoreGoods::class,StoreGoods::query(),$conditions,$data);
	}

	public function createStoreGoods($data){
		$this->create(StoreGoods::class,$data);
	}

	public function deleteStoreGoods($conditions = null){
		$this->delete(StoreGoods::class,StoreGoods::query(),$conditions);
	}
}